import createAxios from '../../utils/request'
export const refreshTokenUrl = '/api/v1/refresh-token'
import { useUserInfo } from '../../stores/userInfo'

export function refreshToken() {
    const userInfo = useUserInfo()
    return createAxios({
        url: refreshTokenUrl,
        method: 'POST',
        data: {
            refresh_token: userInfo.getToken('refresh'),
        },
    })
}